<template>
	<div class="test">
		<h2>学校名称:{{name}}</h2>
		<h2>学校地址:{{address | mySlice(2)}}</h2>
		<button>点我提示学校信息</button>
	</div>
</template>

<script>
	export default {
		name:'School',
		data() {
			return {
				name:'尚硅谷',
				address:'宏福科技园'
			}
		},
		methods: {
			showSchool(){
				alert(`${this.name}，${this.address}`)
			}
		}
	}
</script>

<style scoped>
	.test{
		background-color: orange;
		padding: 10px;
	}
</style>